package org.misalen.web.database.repository.mysql;

import org.misalen.web.database.dao.mysql.impl.BaseMySqlDaoImpl;
import org.misalen.web.database.model.mysql.pro.ProWebAdvertisingCarrier;
import org.misalen.web.database.util.PaginationFrom;
import org.springframework.stereotype.Repository;

@Repository
public class ProWebAdvertisingCarrierRepository extends BaseMySqlDaoImpl<ProWebAdvertisingCarrier> {

	@SuppressWarnings("unchecked")
	public PaginationFrom<ProWebAdvertisingCarrier> findByType(PaginationFrom<ProWebAdvertisingCarrier> pagination,
			String type) {
		//TODO 总页数 没返回
		return (PaginationFrom<ProWebAdvertisingCarrier>) findPageByHql(
				"from ProWebAdvertisingCarrier where type=?0 order by addTime desc", new Object[] { type }, pagination);
	}

}